<template>
	<view>
		<view class="mainpadding2">
			<view class="mainpadding_top ffffff radius">
				<view class="titletext hei_text bold">呼叫分享</view>
				<u--textarea v-model="ordercall_share_title" class="margin_top" placeholder="" maxlength="-1" autoHeight></u--textarea>
				<!-- <textarea class="margin_top hei_text main_size" placeholder="請輸入呼叫分享標題文字"
					v-model="ordercall_share_title" style="width: 100%; height: 100rpx;" maxlength="-1"></textarea> -->
			</view>
			<view class="mainpadding_top ffffff radius">
				<view class="titletext hei_text bold">店鋪分享</view>
				<u--textarea v-model="shop_share_title" class="margin_top" placeholder="" maxlength="-1" autoHeight ></u--textarea>
				<!-- <textarea class="margin_top hei_text main_size" placeholder="請輸入店鋪分享標題文字" maxlength="-1" v-model="shop_share_title"
					style="width: 100%; height: 100rpx;"></textarea> -->
			</view>
			<view class="mainpadding_top ffffff radius">
				<view class="titletext hei_text bold">分銷分享</view>
				<u--textarea v-model="fy_share_title" class="margin_top" placeholder="" maxlength="-1" autoHeight ></u--textarea>
				<!-- <textarea class="margin_top hei_text main_size" placeholder="請輸入分銷分享標題文字" maxlength="-1" v-model="fy_share_title"
					style="width: 100%; height: 100rpx;"></textarea> -->
			</view>
		</view>
		<view class="posibottom mainpadding2">
			<view class="submitbtn" @click="submit">保存</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				ordercall_share_title: "",
				shop_share_title: "",
				fy_share_title: "",

			}
		},
		onLoad() {
			this.getInfo()
		},
		methods: {
			getInfo() {
				uni.showLoading({
					mask: true,
					title: "請稍後"
				})
				this.http.request("/api/shop/Shopdeail", "POST", {
					shop_id: uni.getStorageSync("shop_id"),
				}).then(res=>{
					uni.hideLoading()
					this.ordercall_share_title = res.data.ordercall_share_title
					this.shop_share_title = res.data.shop_share_title
					this.fy_share_title = res.data.fy_share_title
				})
			},
			submit() {
				uni.showLoading({
					mask: true,
					title: "請稍後"
				})
				this.http.request("/api/shop/Shopedit", "POST", {
					ordercall_share_title: this.ordercall_share_title,
					shop_share_title: this.shop_share_title,
					fy_share_title: this.fy_share_title,
					shop_id: uni.getStorageSync("shop_id"),
				}).then(res => {
					uni.hideLoading()
					if (res.code == 1) {
						this.http.toast("保存成功")
						setTimeout(() => {
							uni.navigateBack(1)
						}, 500)
					}else{
						this.http.toast(res.msg)
					}
				})
			}
		}
	}
</script>

<style>

</style>